package com.itheima.test1;

public class TestSwimming {
    public static void main(String[] args) {

        goSwimming(() -> System.out.println("我们去游泳吧~"));

        /**
         * 理解：对于 Lambda 表达式，对匿名内部类进行了优化
         */
        goSwimming(() -> System.out.println("我们去游泳吧~"));
    }

    public static void goSwimming(iSwimming swimming) {
        swimming.show();
    }
}

interface iSwimming {
    void show();
}

